<?php

declare (strict_types=1);
namespace Swb\Shop\Model;

use Hyperf\DbConnection\Model\Model as BaseModel;
/**
 * @property string $id
 * @property string $login_name 
 * @property string $user_name 
 * @property string $password 
 * @property string $phone 
 * @property int $gender 
 * @property int $status 
 * @property string $open_id 
 * @property string $union_id 
 * @property string $secret 
 * @property string $user_role 
 * @property string $role_name 
 * @property string $department_id 
 * @property string $department_name 
 * @property string $create_time 
 * @property string $create_by 
 * @property string $update_time 
 * @property string $update_by 
 * @property string $good_business 
 * @property string $main_business_circle 
 * @property string $working_seniority 
 * @property string $hiredate 
 * @property string $head_pic 
 * @property int $del_flag 
 * @property int $shop_count 
 * @property int $apartment_count 
 * @property int $client_count 
 * @property int $service_count 
 */
class SysUser extends BaseModel
{
    /**
     * The table associated with the model.
     *
     * @var string
     */
    protected $table = 'sys_user';
    /**
     * The attributes that are mass assignable.
     *
     * @var array
     */
    protected $fillable = [];
    /**
     * The attributes that should be cast to native types.
     *
     * @var array
     */
    protected $casts = ['id' => 'string', 'gender' => 'integer', 'status' => 'integer', 'del_flag' => 'integer', 'shop_count' => 'integer', 'apartment_count' => 'integer', 'client_count' => 'integer', 'service_count' => 'integer'];
    public function getfile(){
        return $this
            ->belongsTo(File::class,'head_pic','id')
            ->select('access_path');
    }
}